# -*- coding: utf-8 -*-
import unittest

from tools import handle_request


class PostUserCreate(unittest.TestCase):
    def setUp(self):
        self.run = handle_request.RequestHandler()

    def test_user_create_01(self):
        url = 'http://59.56.77.23:8203/user/create'

        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }
        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_02(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_03(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_04(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_05(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '111',

                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_06(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_07(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_08(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_09(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }
        res = self.run.visit("post", url, data=data)
        print(res.text)

    def test_user_create_10(self):
        url = 'http://59.56.77.23:8203/user/create'
        data = {'tenantId': '501e52ab-8c76-4221-8623-198a97d513fa',
                'nickname': '陈繁',
                'mobile': '11122',
                'email': '111122@qq.com',
                'password': '123456',

                }

        res = self.run.visit("post", url, data=data)
        print(res.text)


if __name__ == '__main__':
    unittest.main()
